10. Backup and Restore

Velero-based backup and restore for IX25 is experimental. Use the Velero examples in this chapter for evaluation and controlled validation only. Customers remain responsible for defining, testing, and operating a backup and disaster recovery strategy that satisfies their own recovery requirements.

10.1 Backup Strategy

IX25 is a stateful application platform. A useful backup strategy must protect Kubernetes objects, persistent volumes, credentials, and any external dependencies used by the deployment.

Recommended baseline:

  • run scheduled backups

  • keep multiple restore points

  • validate restores regularly

  • keep backup storage outside the IX25 cluster

  • create an on-demand backup before upgrades or risky changes

10.2 What to Back Up

For bundled dependencies, back up:

  • PostgreSQL PVC

  • RustFS PVC, when s3.provider=rustfs

  • NATS PVC

  • Keycloak state, depending on chart version and enabled resources

  • file storage PVC, when s3.provider=filesystem

  • Vault credentials Secret, <release>-vault-credentials

  • Kubernetes objects in the IX25 namespace

  • generated and customer-created Secrets

Experimental external PostgreSQL, Vault, and S3 deployments must be backed up through their own platform-native mechanisms.

10.3 Experimental Velero Backup Prerequisites

The chart can create experimental Velero resources, but it does not install Velero itself. Before enabling chart-managed Velero resources:

  • install Velero and its CRDs

  • provide backup object storage

  • choose CSI snapshots or filesystem backups

  • create Velero credentials

  • verify Velero can create and restore backups

10.4 Consistency Considerations

Velero protects objects and volumes, but application consistency still matters. Because Velero-based IX25 backup and restore is experimental, validate crash consistency, snapshot behavior, and restore results in a non-production environment before relying on it.

If the customer has strict recovery requirements, include restore drills in the operational process.

10.5 Experimental Velero Integration

Example scheduled backup configuration:

Kopieren
backup:
  velero:
    enabled: true
    namespace: velero
    backupStorageLocation:
      enabled: true
      provider: aws
      bucket: ix25-backups
      prefix: ix25
      credential:
        existingSecret: velero-aws-credentials
        secretKey: cloud
    schedule:
      enabled: true
      schedule: "0 2 * * *"
      ttl: "168h"
      includeClusterResources: false
      snapshotVolumes: true
      defaultVolumesToFsBackup: false

Set defaultVolumesToFsBackup=true and snapshotVolumes=false when CSI snapshots are not available.

10.6 Experimental Velero Backup Credentials

Velero credentials for AWS S3 or S3-compatible storage use the standard AWS INI format:

Kopieren
[default]
aws_access_key_id=YOUR_ACCESS_KEY_ID
aws_secret_access_key=YOUR_SECRET_ACCESS_KEY

Create the Secret in the Velero namespace:

Kopieren
kubectl -n velero create secret generic velero-aws-credentials \
  --from-file=cloud=./velero-credentials

10.7 Experimental Scheduled Backups

Verify resources:

Kopieren
kubectl -n velero get backupstoragelocations.velero.io
kubectl -n velero get volumesnapshotlocations.velero.io
kubectl -n velero get schedules.velero.io

Verify backups:

Kopieren
kubectl -n velero get backups.velero.io
velero backup get

10.8 Experimental On-Demand Backups

Create a backup from a schedule:

Kopieren
velero backup create ix25-manual --from-schedule <schedule-name>

Or configure a one-time Helm-managed Velero Backup resource:

Kopieren
backup:
  velero:
    enabled: true
    backup:
      enabled: true
      name: ix25-pre-upgrade
      ttl: "168h"
      snapshotVolumes: true

10.9 Experimental Velero Restore Procedure

Restore from a backup:

Kopieren
velero restore create ix25-restore --from-backup <backup-name>
velero restore describe ix25-restore --details

Restore into a different namespace when needed:

Kopieren
velero restore create ix25-restore \
  --from-backup <backup-name> \
  --namespace-mappings ix25=ix25-restore

Review warnings before making the restored environment available.

10.10 Post-Restore Validation

After an experimental Velero restore, verify:

  • PostgreSQL is running and ready.

  • Vault is initialized and unsealed.

  • The Vault credentials Secret was restored.

  • Keycloak is ready and login works.

  • RustFS or external object storage is accessible.

  • NATS data is available.

  • IX25 application pods become Ready.

  • The main URL and core application flows work.

Vault uses the projected service account token of the restored Vault pod for Kubernetes TokenReview calls. Recreating the Vault ServiceAccount with a new UID therefore does not require a separate reviewer-token Secret or manual Vault auth reconfiguration. Backups taken from an older chart version can be migrated by running a Helm upgrade with vault.bootstrap.enabled=true.

10.11 Disaster Recovery Scenarios

For PostgreSQL corruption, treat the issue as a release-wide incident:

  1. stop user traffic

  2. scale down application workloads

  3. preserve the corrupted volume if required

  4. restore PostgreSQL or the full namespace from a known-good backup

  5. start PostgreSQL first

  6. start Vault and Keycloak

  7. restore application workloads

  8. validate authentication, application APIs, and file access

If the Vault unseal Secret is missing, restore <release>-vault-credentials from a validated backup. Without the unseal key and root token, bundled Vault data cannot be recovered.

10.12 Experimental External Dependency Backup Responsibilities

Experimental Velero backups of the IX25 namespace do not protect experimental external PostgreSQL, external Vault, or external S3 deployments. Use the backup and restore mechanisms provided by those services and coordinate restore points with IX25 release backups.